package com.video.controller;

import com.video.service.VipServiceI;
import com.video.utils.ResultMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;

@Controller
public class VipController {
    @Autowired
    private VipServiceI vipServiceI;

    @RequestMapping("/selectAllVip")
    @ResponseBody
    public ResultMap selectAllVip() {
        return vipServiceI.selectAllVip();
    }

    @RequestMapping("/createVip")
    @ResponseBody
    public ResultMap createVip(String vipStr) {
        return vipServiceI.createVip(vipStr);
    }

    @RequestMapping("/updateVipByVtId")
    @ResponseBody
    public ResultMap updateVipByVtId(String vipStr) {
        return vipServiceI.updateVipByVtId(vipStr);
    }

    @RequestMapping("/deleteVipByVtid")
    @ResponseBody
    public ResultMap deleteVipByVtid(String vtId) {
        return vipServiceI.deleteVipByVtid(vtId);
    }

    @RequestMapping("/insertMember")
    @ResponseBody
    public ResultMap insertMember(String vtId, HttpSession session) {
        return vipServiceI.insertMember(vtId,session);
    }

}
